package cn.edu.bcu.ls.controller;

import cn.edu.bcu.ls.entity.Answer;
import cn.edu.bcu.ls.entity.Question;
import cn.edu.bcu.ls.serviceImpl.AnswerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AnswerController {

    @Autowired
    private AnswerService answerService ;

    @ApiOperation(value = "上传回答，传入你想要的传的值就行")
    @PostMapping(value="answer")
    public boolean insertOrder(Answer answer) {



        if (answerService.insert(answer) >0) {
            return true;
        }else {
            return false;
        }
    }
}
